package com.itic.appbase.framework.type;

public enum AfterSaleDealType {

	Refunding("001","退款中"),
	RefundClose("002","换货关闭/退货关闭"),
	Pending("003","待处理"),
	Refuse("004","售后拒绝"),
	AgreeRefund("005","同意换货填写物流"),
	RefundSuccess("006","退款成功"),
	CanceAlpply("007","撤销申请"),
	checkedApply("008","已审核"),
	finished("009","已完成"),
	changing("010","换货中"),
	mending("011","维修中"),
	Agreeback("012","同意退货填写物流");

	private String state;
	private String name;
	AfterSaleDealType(String state, String name) {
		this.state = state;
		this.name = name;
	}
	public String getState() {
		return state;
	}
	public void setState(String state) {
		this.state = state;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	
	public static AfterSaleDealType getType(String state) {
		AfterSaleDealType type = null;
		switch (state) {
		case "001":
			type = AfterSaleDealType.Refunding;
			break;
		case "002":
			type = AfterSaleDealType.RefundClose;
			break;
		case "003":
			type = AfterSaleDealType.Pending;
			break;
		case "004":
			type = AfterSaleDealType.Refuse;
			break;
		case "005":
			type = AfterSaleDealType.AgreeRefund;
			break;
		case "006":
			type = AfterSaleDealType.RefundSuccess;
			break;
		case "007":
			type = AfterSaleDealType.CanceAlpply;
			break;
		case "008":
			type = AfterSaleDealType.checkedApply;
			break;
		case "009":
			type = AfterSaleDealType.finished;
			break;
		default:
			break;
		}
		return type;
	}


}
